package com.wwp.wkb.ui.web;

import android.text.TextUtils;
import android.webkit.WebView;

import com.wwp.wkb.R;
import com.wwp.wkb.base.BaseActivity;

import butterknife.BindView;


public class WebContentActivity extends BaseActivity {
    @BindView(R.id.webview)
    WebView webView;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_web_view;
    }

    @Override
    protected void setUpView() {
        String content = getIntent().getStringExtra("content");
        if (TextUtils.isEmpty(content)) {
            //showToast("content是空字符串，错误！！");
            return;
        }
        String title = getIntent().getStringExtra("title");
        if (TextUtils.isEmpty(title)) {
            setTitleBarTitle("详情");
        } else {
            setTitleBarTitle(title);
        }

        webView.getSettings().setLoadWithOverviewMode(true);// 缩放至屏幕的大小
        webView.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
    }
}
